package com.atguigu.edu.entity.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Data
public class SubjectData {

    @ExcelProperty(value = "一级分类", index = 0)
    private String oneSubjectName;

    @ExcelProperty(value = "二级分类", index = 1)
    private String twoSubjectName;

    // @ExcelProperty(value = "三级分类", index = 2)
    private String thrSubjectName;

    private List<String> fieldList = new ArrayList<String>(3);

    /**
     * excel 中需要确保
     * @return
     */
    public List<String> getFieldList() {
        fieldList.add(this.getOneSubjectName());
        fieldList.add(this.getTwoSubjectName());
        // fieldList.add(this.getThrSubjectName());
        return fieldList;
    }
}
